package com.qianfeng.test.task;

import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.view.View;
import android.widget.ImageView;

import com.qianfeng.test.utils.HttpUtils;

/**
 * Created by Administrator on 15-7-23.
 */
public class ItemImageTask extends AsyncTask<String, Void, Bitmap> {
    private ImageView image;
    //private String outUrl;
    public ItemImageTask(ImageView image){
        this.image = image;
    }
    @Override
    protected Bitmap doInBackground(String... params) {

        return HttpUtils.getBitmap(params[0]);
    }

    @Override
    protected void onPostExecute(Bitmap bitmap) {

        super.onPostExecute(bitmap);
       // String picUrl = (String) image.getTag();
        image.setVisibility(View.VISIBLE);
        image.setImageBitmap(bitmap);

    }
}
